package com.nsgf.library.data.bean;

import com.nsgf.library.data.api.APIs;
import com.nsgf.skjz.utils.StringUtil;

import java.io.Serializable;
import java.util.List;

public class WorkOrderBean implements Serializable {

    /**
     * orderCode : JCJC20240920103610419977
     * workOrderSource : 1
     * taskName : app任务测试
     * startTime : 2024-09-20 00:00:00
     * endTime : null
     */

    private int id;
    private String orderCode;
    private String businessCode;
    private int workOrderSource;
    private String taskName;
    private String startTime;
    private String updateTime;
    private int isResponsibleBy;
    private int isComplete;
    private String reportDate;
    private String place;
    private int status;
    private String businessType;
    private String businessTypeText;

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getProblemDescription() {
        return problemDescription;
    }

    public void setProblemDescription(String problemDescription) {
        this.problemDescription = problemDescription;
    }

    public String getDisposeType() {
        return disposeType;
    }

    public void setDisposeType(String disposeType) {
        this.disposeType = disposeType;
    }

    public String getDisposeTypeDesc() {
        return disposeTypeDesc;
    }

    public void setDisposeTypeDesc(String disposeTypeDesc) {
        this.disposeTypeDesc = disposeTypeDesc;
    }

    public String getDisposeDescription() {
        return disposeDescription;
    }

    public void setDisposeDescription(String disposeDescription) {
        this.disposeDescription = disposeDescription;
    }

    private String problemDescription;
    private String disposeType;
    private String disposeTypeDesc;
    private String disposeDescription;
    private List<WorkOrderDetailBean.FileDto> imageUrls;
    private String reportPeopleCode;
    private String reportPeopleName;

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public int getWorkOrderSource() {
        return workOrderSource;
    }

    public String getWorkOrderSourceSrc() {
        switch (workOrderSource) {
            case 1:
                return "工程巡查";
            case 2:
                return "任务计划";
            case 3:
                return "异常问题";
            case 4:
                return "险情上报";
            case 5:
                return "违法行为上报";
            case 6:
                return "设备巡检";
            default:
                return "";
        }
    }

    public void setWorkOrderSource(int workOrderSource) {
        this.workOrderSource = workOrderSource;
    }

    public String getTaskName() {
        return taskName;
    }

    public String getTaskNameSrc() {
        return "任务名称：" + taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getStartTimeSrc() {

        if (0 == status)
            return "开始时间：" + startTime;
        else
            return "完成时间：" + getUpdateTime();
    }

    public String getStartTime() {
        return startTime;
    }


    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public int getIsResponsibleBy() {
        return isResponsibleBy;
    }

    public void setIsResponsibleBy(int isResponsibleBy) {
        this.isResponsibleBy = isResponsibleBy;
    }

    public int getIsComplete() {
        return isComplete;
    }

    public void setIsComplete(int isComplete) {
        this.isComplete = isComplete;
    }

    public String getReportDate() {
        return reportDate;
    }

    public void setReportDate(String reportDate) {
        this.reportDate = reportDate;
    }

    public List<WorkOrderDetailBean.FileDto> getImageUrls() {
        return imageUrls;
    }

    public List<WorkOrderDetailBean.FileDto> getHttpImageUrls() {
        if (null == getImageUrls())
            return null;
        List<WorkOrderDetailBean.FileDto> fileDtos = getImageUrls();
        for (int i = 0; i < fileDtos.size(); i++) {
            fileDtos.get(i).setFilePath(APIs.BASE_URL_IMG + fileDtos.get(i).getFilePath());
        }
        return fileDtos;
    }

    public void setImageUrls(List<WorkOrderDetailBean.FileDto> imageUrls) {
        this.imageUrls = imageUrls;
    }

    public String getReportPeopleCode() {
        return reportPeopleCode;
    }

    public void setReportPeopleCode(String reportPeopleCode) {
        this.reportPeopleCode = reportPeopleCode;
    }

    public String getReportPeopleName() {
        return reportPeopleName;
    }

    public void setReportPeopleName(String reportPeopleName) {
        this.reportPeopleName = reportPeopleName;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUpdateTime() {
        return StringUtil.isEmpty(updateTime) ? "" : updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBusinessCode() {
        return businessCode;
    }

    public void setBusinessCode(String businessCode) {
        this.businessCode = businessCode;
    }

    public String getBusinessTypeText() {
        return businessTypeText;
    }

    public void setBusinessTypeText(String businessTypeText) {
        this.businessTypeText = businessTypeText;
    }
}
